package com.yuw.hw20190410.test02;

public class Vehicle {

	// 属性
	private String vehicleName;
	private double vehicleSpeed;

	public Vehicle(String vehicleName, double vehicleSpeed) {
		super();
		this.vehicleName = vehicleName;
		this.vehicleSpeed = vehicleSpeed;
	}

	// 行为
	public void move() {
		// showMe(); // 非静态的方法可以访问静态的方法
		System.out.println(this.vehicleName + " is moving at speed of " + this.vehicleSpeed);
	}

	public double getVehicleSpeed() {
		return vehicleSpeed;
	}

	public void setVehicleSpeed(double vehicleSpeed) {
		this.vehicleSpeed = vehicleSpeed;
	}

	// 品牌不能修改，没有set方法
	public String getVehicleName() {
		return vehicleName;
	}

}
